
double Get_CPU_Clock_Speed()
{// addr = 0x08048A22
    FILE* fp;
    char* match;
    char[10239] buffer;
    size_t bytes_read;
    float clock_speed;
    double _v8;
    double _v12;
    signed int _v16;
    char _v10256;
    char _v10260;
    signed int _v10272;
    char* _v10276;
    char* _v10280;
    _unknown_ r6;
    _unknown_ _t29;
    double _t31;
    _unknown_ _t36;
    double _t38;

    _v16 = 0;
    L08060B50("/proc/cpuinfo", "r");
    _v16 = __eax;
    __eflags = _v16;
    if(_v16 != 0) {
        L0806F850(__ebx, __edi, __esi,  &_v10256, 0, 10240);
        _v10272 = _v16;
        _v10276 = 1;
        _v10280 = 10240;
        _t31 =  &_v10256;
         *__esp = _t31;
        L08060C40(__ebx, __edi, __esi);
        _v8 = _t31;
        L08060220(_v16);
        __eflags = _v10256 & 255;
        if(__eflags != 0) {
            _t36 = L0806E770(__esp, __eflags,  &_v10256);
             *(__ebp + _t36 + -10252) = 0;
            _t38 = L0806F010( &_v10256,  &_v10256, "cpu MHz");
            _v12 = _t38;
            __eflags = _v12;
            if(_v12 != 0) {
                _v10276 =  &_v10260;
                _v10280 = "cpu MHz : %f";
                _t38 = _v12;
                 *__esp = _t38;
                L0805FFB0();
                asm("fld dword [ebp+0xffffd7f0]");
                asm("fstp qword [ebp+0xffffd7e8]");
            } else {
                asm("fldz ");
                asm("fstp qword [ebp+0xffffd7e8]");
            }
        } else {
            asm("fldz ");
            asm("fstp qword [ebp+0xffffd7e8]");
        }
    } else {
        asm("fldz ");
        asm("fstp qword [ebp+0xffffd7e8]");
    }
    asm("fld qword [ebp+0xffffd7e8]");
    return _t38;
}